﻿<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width, initial-scale=1, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！-->
    <title>学生惠后台管理系统</title>
    <link rel="stylesheet" href="/App/Admin/public/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="/App/Admin/public/css/jquery.datetimepicker.css"/>
    <link rel="stylesheet" href="/App/Admin/public/css/style.css"/>
</head>
<body>
<div class="mainBody">
    
     <include file="Public:left"/>
    
    <div class="main">
        
     <include file="Public:top"/>

        <div class="subNav">
            <span class="text"><i class="iconFont">&#xe600;</i>惠通知</span>
        </div>

        <div class="indexBox">
            <div class="con-det">
                <div class="listBox">
                    <div class="listScroll">
                        <table class="table table-striped">
                            <tr>
                                <th>惠通知编号</th>
                                <th>商家名称</th>
                                <th>标题</th>
                                <th>发布时间</th>
                                <th>有效期</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                            
                             <foreach name="list" item="item" >
                            <tr>
                                <td>{$item.id}</td>
                                <td>{$item.shop_name}</td>
                                <td>{$item.title}</td>
                                <td>{$item.add_time|date='Y-m-d',###}</td>
                                <td>{$item.start_time|date='Y-m-d',###}-{$item.end_time|date='Y-m-d',###}</td>
                               
                                <td>      
                                    
                                          <if condition="$item.is_open eq 1" >
                                            
                                                    <if condition="$item.check_status eq 1 ">
                                                           待审核
                                                    <elseif condition="$item.check_status eq 3 "/>
                                                           审核驳回
                                                    <elseif condition="$item.check_status eq 4" />
                                                            已过期
                                                    <else/>  
                                                            上架
                                                    </if>

                                            <else/>  
                                            下架
                                            </if>
                                </td>
                                
                                <td>
                                    <a href="{:U('Notice/editNotice','&id='.$item['id'])}" class="btn btn-default btn-xs">查看</a>
                                  
                                              <!--   <if condition="$item.check_status eq 1 ">
						 待审核
					        <elseif condition="$item.is_expired neq 100" />
						 已过期
						 <elseif condition="$item.is_open eq 1" />
						 <a href="{:U('Notice/opdown','id='.$item['id'].'&is_open='.$item['is_open'])}" title="下架"  class="btn btn-default btn-xs" onClick="javascript:if(confirm('确定此通知下架？')){return true;}else{return false;}">下架</a>
						 <elseif condition="$item.is_open eq 2"/>
						 <a href="{:U('Notice/opdown','id='.$item['id'].'&is_open='.$item['is_open'])}" title="上架" class="btn btn-default btn-xs" onClick="javascript:if(confirm('确定允许此通知上架？')){return true;}else{return false;}">上架</a>
						 <else/>       
                                                 </if>-->

                                       
                                                <if condition="$item.is_open eq 1" >
                                            
                                                    <if condition="$item.check_status eq 1 ">
                                                      <!--待审核-->
                                                        <a href="javascript:void(0);" title="取消"  class="btn btn-default btn-xs" onClick="javascript:if(confirm('尚未审核')){return true;}else{return false;}">上架</a>/
                                                        <a href="javascript:void(0);" title="取消"  class="btn btn-default btn-xs" onClick="javascript:if(confirm('尚未审核')){return true;}else{return false;}">下架</a>
                                                    <elseif condition="$item.check_status eq 3 "/>
                                                      <!-- 审核驳回-->
                                                        <a href="javascript:void(0);" title="取消"   class="btn btn-default btn-xs" onClick="javascript:if(confirm('审核被驳回')){return true;}else{return false;}">上架</a>/
                                                        <a href="javascript:void(0);" title="取消"   class="btn btn-default btn-xs" onClick="javascript:if(confirm('审核被驳回')){return true;}else{return false;}">下架</a>
                                                    <elseif condition="$item.check_status eq 4" />
                                                     <!-- 已过期-->
                                                        <a href="javascript:void(0);" title="取消"  class="btn btn-default btn-xs"  onClick="javascript:if(confirm('已过期')){return true;}else{return false;}">上架</a>/
                                                        <a href="javascript:void(0);" title="取消"   class="btn btn-default btn-xs" onClick="javascript:if(confirm('已过期')){return true;}else{return false;}">下架</a>
                                                    <else/>  
                                                     <!--上架-->
                                                   
                                                      <a href="{:U('Notice/opdown','id='.$item['id'].'&is_open='.$item['is_open'])}" title="下架"  class="btn btn-default btn-xs" onClick="javascript:if(confirm('确定此通知下架？')){return true;}else{return false;}">下架</a>
                                                    </if>

                                            <else/>  
                                             <!--下架-->
                                              <a href="{:U('Notice/opdown','id='.$item['id'].'&is_open='.$item['is_open'])}" title="上架" class="btn btn-default btn-xs" onClick="javascript:if(confirm('确定允许此通知上架？')){return true;}else{return false;}">上架</a>
                                              
                                            </if>
                                



                                </td>
                            </tr>
                             </foreach>
                        </table>
                    </div>
                    <nav aria-label="Page navigation">
                        <ul class="pagination fr">
                           <!-- <li class="disabled">
                                <a href="#" aria-label="Previous">
                                    <span aria-hidden="true">&laquo;</span>
                                </a>
                            </li>
                            <li class="active"><a href="#">1</a></li>
                            <li><a href="#">2</a></li>
                            <li><a href="#">3</a></li>
                            <li><a href="#">4</a></li>
                            <li><a href="#">5</a></li>
                            <li>
                                <a href="#" aria-label="Next">
                                    <span aria-hidden="true">&raquo;</span>
                                </a>
                            </li>-->
                           {$page}
                        </ul>
                    </nav>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript" src="/App/Admin/public/js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="/App/Admin/public/js/jquery.datetimepicker.js"></script>
<script type="text/javascript" src="/App/Admin/public/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/App/Admin/public/js/time.js"></script>
<script type="text/javascript" src="/App/Admin/public/js/public.js"></script>
</body>
</html>








